package com.cpd.blog.service.impl;

import com.cpd.blog.common.constant.Constant;
import com.cpd.blog.manager.mapper.LogMapper;
import com.cpd.blog.entity.Log;
import com.cpd.blog.service.LogService;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Service;

/**
 * @Author: Copydown
 * @Date: 2022/04/29/1:25
 */
@Service
@RequiredArgsConstructor
public class LogServiceImpl implements LogService {

    private final LogMapper logMapper;

    @Override
    public boolean recordLog(Log log) {
        return logMapper.insert(log) == Constant.ONE_INT;
    }
}
